//
//  CAShapeLayer+KR.m
//  KEREN
//
//  Created by MW on 2023/3/10.
//

#import "CAShapeLayer+KR.h"

@implementation CAShapeLayer (KR)
+ (CAShapeLayer *)clipsToBounds:(CGRect)rect Corners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii{
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:rect byRoundingCorners:corners cornerRadii:cornerRadii];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = rect;
    maskLayer.path = maskPath.CGPath;
    return maskLayer;
}
@end
